package com.example.demo.mapper;

import com.example.demo.bean.Permission;
import com.example.demo.bean.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionMapper {
    @Select("select p.id, p.pername from role r,permission p,role_permission rp where r.id=rp.rid and p.id=rp.pid and r.id=#{id}")
    List<Permission> findByRoleId(int id);
}
